package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TVehicleDriverInfoMapper;
import com.ruoyi.system.domain.TVehicleDriverInfo;
import com.ruoyi.system.service.ITVehicleDriverInfoService;

/**
 * 车人信息Service业务层处理
 * 
 * @author wzy
 * @date 2024-08-30 11:00:55
 */
@Service
public class TVehicleDriverInfoServiceImpl implements ITVehicleDriverInfoService 
{
    @Autowired
    private TVehicleDriverInfoMapper tVehicleDriverInfoMapper;

    /**
     * 查询车人信息
     * 
     * @param vehicleDriverId 车人信息主键
     * @return 车人信息
     */
    @Override
    public TVehicleDriverInfo selectTVehicleDriverInfoByVehicleDriverId(Long vehicleDriverId)
    {
        return tVehicleDriverInfoMapper.selectTVehicleDriverInfoByVehicleDriverId(vehicleDriverId);
    }

    /**
     * 查询车人信息列表
     * 
     * @param tVehicleDriverInfo 车人信息
     * @return 车人信息
     */
    @Override
    public List<TVehicleDriverInfo> selectTVehicleDriverInfoList(TVehicleDriverInfo tVehicleDriverInfo)
    {
        return tVehicleDriverInfoMapper.selectTVehicleDriverInfoList(tVehicleDriverInfo);
    }

    /**
     * 新增车人信息
     * 
     * @param tVehicleDriverInfo 车人信息
     * @return 结果
     */
    @Override
    public int insertTVehicleDriverInfo(TVehicleDriverInfo tVehicleDriverInfo)
    {
        tVehicleDriverInfo.setCreateTime(DateUtils.getNowDate());
        return tVehicleDriverInfoMapper.insertTVehicleDriverInfo(tVehicleDriverInfo);
    }

    /**
     * 修改车人信息
     * 
     * @param tVehicleDriverInfo 车人信息
     * @return 结果
     */
    @Override
    public int updateTVehicleDriverInfo(TVehicleDriverInfo tVehicleDriverInfo)
    {
        tVehicleDriverInfo.setUpdateTime(DateUtils.getNowDate());
        return tVehicleDriverInfoMapper.updateTVehicleDriverInfo(tVehicleDriverInfo);
    }

    /**
     * 批量删除车人信息
     * 
     * @param vehicleDriverIds 需要删除的车人信息主键
     * @return 结果
     */
    @Override
    public int deleteTVehicleDriverInfoByVehicleDriverIds(Long[] vehicleDriverIds)
    {
        return tVehicleDriverInfoMapper.deleteTVehicleDriverInfoByVehicleDriverIds(vehicleDriverIds);
    }

    /**
     * 删除车人信息信息
     * 
     * @param vehicleDriverId 车人信息主键
     * @return 结果
     */
    @Override
    public int deleteTVehicleDriverInfoByVehicleDriverId(Long vehicleDriverId)
    {
        return tVehicleDriverInfoMapper.deleteTVehicleDriverInfoByVehicleDriverId(vehicleDriverId);
    }

    /**
     * 查询车人信息列表
     *
     * @param tVehicleDriverInfo 车人信息，By Vehicle License Number
     * @return 车人信息
     */
    @Override
    public List<TVehicleDriverInfo> selectTVehicleDriverInfoByNumber(TVehicleDriverInfo tVehicleDriverInfo)
    {
        return tVehicleDriverInfoMapper.selectTVehicleDriverInfoByNumber(tVehicleDriverInfo);
    }

    /**
     * 查询车人信息
     *
     * @param vehicleLicenseNumber 车人信息主键
     * @return 车人信息
     */
    @Override
    public TVehicleDriverInfo selectTVehicleDriverInfoByVehicleLicenseNumber(String vehicleLicenseNumber)
    {
        return tVehicleDriverInfoMapper.selectTVehicleDriverInfoByVehicleLicenseNumber(vehicleLicenseNumber);
    }
}
